package cn.yll.common.constant;

/**
 * 项目常量类
 * @author yangll
 */
public interface MyConstants {
    String TOKEN_KEY = "Authorization";
    /**
     * 请求来源
     */
    String FROM_SOURCE = "from-source";

    /**
     * 验证码 redis key
     */
    String CAPTCHA_CODE_KEY = "captcha_codes:";
    /**
     * 验证码有效期（分钟）
     */
    long CAPTCHA_EXPIRATION = 2;
    String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
    String DEFAULT_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
    String DEFAULT_TIME_FORMAT = "HH:mm:ss";
    String FILE_NAME_TIME = "yyyyMMddHHmmssSSS";

    /**
     * 用户登录后存放用户信息的session key
     */
    String LOGIN_USER_ID = "loginUserId";

    int IP_MAX_LENGTH = 15;
    int IP_MIN_LENGTH = 7;

    String UNKNOWN = "unknown";
    String IP_SPLIT = ",";
    int PHONE_LENGTH = 11;

    /**
     * 时 - 秒
     */
    int HOUR_SECONDS = 3600;
    /**
     * 分 - 秒
     */
    int MINUTE_SECONDS = 60;
    /**
     * 计算天
     */
    int DAY_SECONDS = 86400;

}
